package cz.spock.exception;

import java.util.logging.Logger;

/**
 * super class for all runtime exceptions
 * 
 * provides logging
 * constructors with
 * 
 * @author miso
 *
 */
@SuppressWarnings("serial")
public class SpockRuntimeException extends RuntimeException {

    private int errorCode;
    protected static final Logger log = Logger.getLogger(SpockRuntimeException.class.getName());

    public SpockRuntimeException() {
    }
    
    public SpockRuntimeException(int errCode) {
        this.errorCode = errCode;
    }
    
    public SpockRuntimeException(String msg, int errCode) {
        super(msg);
        this.errorCode = errCode;
    }
    
    public SpockRuntimeException(String msg) {
        super(msg);
    }
    
    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
    
}
